automate version update - #21
Conversation
|
@adsharma could you PTAL? |
|
Let's fix the arrow version problem first so CI is green. As far as I can tell, brew install doesn't allow installing older versions of arrow. One strategy is to make a new release of ladybug which depends on the latest arrow version. Any other suggestions? |
Guess that's the only way. Others ask users to custom build install libarrow |
|
icebug 13 is out. Please test if it fixes CI |
433fd73 to
eaab39c
Compare
|
Looks lke CI passed after your push |
|
Two minor comments: 1. cargo update command in bump-version.js will likely fail silentlyFile: scripts/bump-version.js, line 53 execSync(`cargo update --precise ${newVersion} --manifest-path src-tauri/Cargo.toml bugscope`, ...)The cargo update CLI expects -p (or --package ) to specify which package to update. The correct syntax is: What's written — appending a bare bugscope at the end — doesn't match cargo's CLI grammar. This will almost certainly exit non-zero, be caught by the catch block, and fall through to the warning message. That means:
The fix: execSync(`cargo update -p bugscope --precise ${newVersion} --manifest-path src-tauri/Cargo.toml`, {
cwd: root,
stdio: "inherit",
});2. Loose version validation regexFile: scripts/bump-version.js, line 18 if (!/^\d+\.\d+\.\d+/.test(newVersion)) {This only checks that the string starts with X.Y.Z — it lacks a trailing $ anchor. Values like 1.2.3.4.5-alpha+build would pass validation when they shouldn't (the comment says "Expected semver (e.g. 1.2.3)"). If strict semver is the goal: if (!/^\d+\.\d+\.\d+$/.test(newVersion)) { |
Version can be updated with
npm run version:bump <new-version>viascripts/bump-version.jsscripts/bump-version.jsupdates all 4 files in one command:package.jsonsrc-tauri/Cargo.tomlpackage-lock.jsonnpm install --package-lock-onlysrc-tauri/Cargo.lockcargo update --precise <version> bugscope